<template>
  <div id="app">
    {{this.$store.state.num}}
    <p>{{this.$store.getters.getNum}}</p>
    <button @click="add">add</button>
    <button @click="asyncadd">add2</button>
  </div>
</template>

<script>
export default {
  methods: {
    add() {
      this.$store.commit('incre', 1)
    },
    asyncadd() {
      this.$store.dispatch('asyncIncre', 2)
    }
  },
}
</script>

<style>

</style>
